Skip to content

Align agentic-retrieval-pipeline-example notebook with validated KB flow#187

Open
mattgotteiner wants to merge 1 commit into
Azure-Samples:mainfrom
mattgotteiner:align-tutorial-kb-20260608
Open

Align agentic-retrieval-pipeline-example notebook with validated KB flow#187
mattgotteiner wants to merge 1 commit into
Azure-Samples:mainfrom
mattgotteiner:align-tutorial-kb-20260608

Conversation

@mattgotteiner

Copy link
Copy Markdown
Contributor

Summary

This PR updates the agentic-retrieval-pipeline-example notebook to align it with the validated MCP connection flow from end-to-end testing, and surfaces Knowledge Bases / Foundry IQ terminology consistently.

Changes

agent-example.ipynb

Cell Change
Title (cell 0) Surface Knowledge Bases and Foundry IQ in description
Load connections (cell 2) Add AzureKeyCredential import; add azure_openai_resource_endpoint() helper to normalize endpoint URLs; add optional AZURE_SEARCH_API_KEY / AZURE_OPENAI_API_KEY support via search_credential
Create index (cell 4) Use search_credential; pass optional API key to AzureOpenAIVectorizerParameters
Upload documents (cell 6) Add timeout=60 to requests.get; use search_credential
Create knowledge source (cell 8) Add semantic_configuration_name="semantic_config"; add page_chunk to source_data_fields; use search_credential
Create knowledge base (cell 10) Remove KnowledgeRetrievalOutputMode enum import; use output_mode="extractiveData" string; fix MCP URL: 2025-11-01-Preview -> 2026-05-01-preview; add endpoint.rstrip('/')
Chat (cell 19) Fix extra_body key: "agent_reference" -> "agent"
SharePoint section (cell 23) Use search_credential
Cleanup (cell 32) Fix delete_index(index) -> delete_index(index_name)

sample.env

Added commented-out optional entries for AZURE_SEARCH_API_KEY and AZURE_OPENAI_API_KEY.

Testing

Changes validated end-to-end against magottei-s1m and magottei-swedencentral-foundry/proj-default (see kr-build-sdk-investigation-20260516).

@mattgotteiner mattgotteiner force-pushed the align-tutorial-kb-20260608 branch from 0819b44 to 1e1492f Compare June 8, 2026 21:04
- Surface 'Knowledge Bases' and 'Foundry IQ' terminology in notebook title/description
- Add AzureKeyCredential support: optional AZURE_SEARCH_API_KEY and AZURE_OPENAI_API_KEY
- Add azure_openai_resource_endpoint() helper to normalize endpoint URLs
- Use search_credential throughout all Search SDK calls
- Add semantic_configuration_name and page_chunk field to knowledge source parameters
- Remove KnowledgeRetrievalOutputMode enum; use output_mode='extractiveData' string
- Fix MCP endpoint API version: 2025-11-01-Preview -> 2026-05-01-preview
- Add endpoint.rstrip('/') to MCP URL construction
- Add timeout=60 to requests.get for document download
- Fix extra_body key: 'agent_reference' -> 'agent' in responses.create
- Fix delete_index(index) -> delete_index(index_name) in cleanup cell
- Add optional AZURE_SEARCH_API_KEY and AZURE_OPENAI_API_KEY to sample.env

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattgotteiner mattgotteiner force-pushed the align-tutorial-kb-20260608 branch from 1e1492f to c36a157 Compare June 8, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant